import React from 'react';
import { PlusOutlined } from '#/utils/antdIcons.js';
import { IOperationType } from '../../../type';
import styles from './index.less';

interface IProps {
  /**
   * 新增
   */
  onAdd?: (operateType: IOperationType) => void;
}

const AddQuestion = (props: IProps) => {
  const { onAdd } = props;

  const _onAdd = () => {
    onAdd && onAdd(IOperationType.ADD);
  };

  return (
    <div className={styles.container} onClick={_onAdd}>
      <div className={styles.add}>
        <PlusOutlined />
      </div>
    </div>
  );
};

export default AddQuestion;
